<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>{SITE_TITLE} - {PAGE_TITLE}</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta http-equiv="Content-Type" content="text/html; charset={LANG_CONTENTTYPE}">
<link href="{SITE_URL}templates/{TPL_NAME}/images/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
var http = createRequestObject();

function createRequestObject() 
{
	var ro;
	var browser = navigator.appName;
	if(browser == "Microsoft Internet Explorer")
	{
		ro = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		ro = new XMLHttpRequest();
	}
	return ro;
}

function nav_over(nav)
{
	document.getElementById('n'+nav).style.backgroundImage="url('{SITE_URL}templates/{TPL_NAME}/images/nav_back_over.gif')";
	document.getElementById('l'+nav).style.color = '#6aa94e';
}
function nav_out(nav)
{
	document.getElementById('n'+nav).style.backgroundImage="url('')";
	document.getElementById('l'+nav).style.color = '#626262';
}
function changeuser(field,but)
{
	if(field.value == '')
	{
		document.getElementById(but).disabled = true;
	}
	else
	{
		document.getElementById(but).disabled = false;
	}
}
function checkavail(field,utype)
{
	username = document.getElementById(field).value;
	
	if(username.length < 4)
	{
		document.getElementById('availres').innerHTML = '{LANG_THEUSER} "'+username+'" {LANG_TOOSHORT}';
		return;
	}
	else if(username.length > 16)
	{
		document.getElementById('availres').innerHTML = '{LANG_THEUSER} "'+username+'" {LANG_TOOLONG}';
		return;
	}
	
	http.open('get', '{SITE_URL}signup.php?type='+utype+'&avail='+username);
    http.onreadystatechange = availResponse;
    http.send(null);
}
function availResponse() 
{
	if(http.readyState == 4)
	{
        var response = http.responseText;
		
		returned = response.split('|');

		if(response.indexOf('|' != -1)) 
		{
			var username=returned[0];
			var status=returned[1];

			if(status == 1)
			{
				document.getElementById('availres').innerHTML = '{LANG_THEUSER} "'+username+'" {LANG_ISAVAIL}';
			}
			else if(status == 2)
			{
				document.getElementById('availres').innerHTML = '{LANG_THEUSER} "'+username+'" {LANG_ISINVALID}';
			}
			else
			{
				document.getElementById('availres').innerHTML = '{LANG_SORRY}, {LANG_THEUSER} "'+username+'" {LANG_ISTAK}';
			}
		}
	}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
	if(selObj.options[selObj.selectedIndex].value != '')
	{
		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
		if (restore) selObj.selectedIndex=0;
	}
}
</script>
</head>
<body>
<div id="wrapper">
	<div class="tbread">
		<div class="tbreaduserinfo clearfix">
			<table width="100%" cellspacing="4" cellpadding="4" border="0">
				<tbody>
				<tr>
					<td align="left">
					<a title="How it works?" href="http://www.tainguyenso.com/html.php?id=escrow">How it works?</a>
					How
					<a title="How we can help Freelancers" href="http://www.tainguyenso.com/html.php?id=freelanc">Freelancers</a>
					make money &
					<a title="How we can help Buyers" href="http://www.tainguyenso.com/html.php?id=buyers">Buyers</a>
					get project done?
					</td>
				<td align="right">
					<a href="{SITE_URL}faq.php">Help</a>
|
<a href="{SITE_URL}contact.php">Contact Us</a>
|
<a class="bug" href="{SITE_URL}report.php">Report a bug</a>

				</td>
				</tr>
				</tbody>
			</table>
		</div>
	</div>
	<div id="header">
		<div class="logo">
			<img src="templates/{TPL_NAME}/images/logo.gif" alt="magfreelancer.com" />
		</div>
		<div class="right_header">
			<div class="top_right-header">
				IF("{ENABLE_QUOTES}"=="1"){
				<span class="title3">{LANG_WELCTO} {USITE_TITLE}</span>
    	<br>
		"{QUOTE}" - {AUTHOR} (
			<a href="quotes.php" class="quote">{LANG_MOREQUOTES}</a>)
	{:IF}
			</div>
			<div class="bottom_right_header">
				<div id="mainnav" class="clearfix">
					<ul class="lmainlevel">
						<li>				
							<a IF("{MENU}"=="index"){class="active"{:IF} title="Home" href="{SITE_URL}index.php">
								<span>Home</span>
							</a>
						</li>
						<li>
							<a IF("{MENU}"=="projects"){class="active"{:IF}  title="Projects" href="{SITE_URL}projects.php">
								<span>Projects</span>
							</a>
						</li>
						<li>
							<a IF("{MENU}"=="Buyers"){class="active"{:IF}  title="Home" href="#">
								<span>Buyer</span>
							</a>
						</li>
						<li>
							<a IF("{MENU}"=="Freelancers"){class="active"{:IF}  title="Home" href="#">
								<span>Freelancer</span>
							</a>
						</li>
						
					</ul>
					<ul class="rmainlevel">
						<li class="tab-yellow">
							<a title="Home" href="search.php">
								<span>Search</span>
							</a>
						</li>
						IF("{USER_TYPE}"!="provider"){
						<li class="tab-red">
							<a title="Home" href="{SITE_URL}create_project.php">
								<span>Post Project</span>
							</a>
						</li>
						{:IF}
						IF("{LOGGED_IN}"=="0"){
						<li class="tab-green">
							<a title="Home" href="{SITE_URL}signup.php">
								<span>Sign Up</span>
							</a>
						</li>
						{:IF}
						IF("{LOGGED_IN}"=="0"){
						<li>
							<a class="active" title="Home" href="{SITE_URL}login.php">
								<span>Login</span>
							</a>
						</li>
						{:IF}
						IF("{LOGGED_IN}"=="1"){
						<li>
							<a class="active" title="Home" href="{SITE_URL}manage.php">
								<span>Manage Account</span>
							</a>
						</li>
						<li class="tab-green">
							<a class="active" title="Home" href="{SITE_URL}logout.php">
								<span>Logout</span>
							</a>
						</li>
						{:IF}
					</ul>
				</div>
				<div style="clear:both"></div>
			</div>
		</div>
	</div>